package com.manger.utils;

public enum ConfigEnum {

    LEGAL_REPRESENTATIVE_ID_CARD(1,"法定代表人身份证"),

    LAWYER_LICENSE(1,"律师证"),

    LAW_FIRM_LETTER(1,"所函"),

    POWER_ATTORNEY(1,"委托书"),

    BUSINESS_LICENSE(1,"营业执照");

    private int code;

    private String desc;

    ConfigEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static ConfigEnum getConfigEnum(String fileName) {
        ConfigEnum[]  values = ConfigEnum.values();
        for (ConfigEnum e : values) {
            if(fileName.contains(e.getDesc())) {
                return e;
            }
        }
        return null;
    }

}
